<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Mesh</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><img src="../assets/css/logo.png" title=""></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
            <li><a href="#api-modules">Modules</a></li>
        </ul>

        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>

        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="../classes/BBox.html">BBox</a></li>
            
                <li><a href="../classes/Buffer.html">Buffer</a></li>
            
                <li><a href="../classes/geo.html">geo</a></li>
            
                <li><a href="../classes/GL.html">GL</a></li>
            
                <li><a href="../classes/Indexer.html">Indexer</a></li>
            
                <li><a href="../classes/LEvent.html">LEvent</a></li>
            
                <li><a href="../classes/Mesh.html">Mesh</a></li>
            
                <li><a href="../classes/Octree.html">Octree</a></li>
            
                <li><a href="../classes/Shader.html">Shader</a></li>
            
                <li><a href="../classes/Texture.html">Texture</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>


            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>Mesh Class</h1>
<div class="box meta">
    

    

    
        <div class="foundat">
            Defined in: <a href="../files/.._src_parsers.js.html#l2"><code>..&#x2F;src&#x2F;parsers.js:2</code></a>
        </div>
    

    

    
</div>



<div class="box intro">
    <p>A data buffer to be stored in the GPU</p>

</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_Mesh" class="method item">
    <h3 class="name"><code>Mesh</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>vertexBuffers</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>indexBuffers</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_parsers.js.html#l2"><code>..&#x2F;src&#x2F;parsers.js:2</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">vertexBuffers</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>object with all the vertex streams</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">indexBuffers</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>object with all the indices streams</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
        
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            
                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                        
                            <li class="index-item method">
                                <a href="#method_addBuffers">addBuffers</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_addIndexBuffer">addIndexBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_addVertexBuffer">addVertexBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_compile">compile</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_computeNormals">computeNormals</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_computeTangents">computeTangents</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_computeWireframe">computeWireframe</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_freeData">freeData</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_generateMetadata">generateMetadata</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getBuffer">getBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getIndexBuffer">getIndexBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getVertexBuffer">getVertexBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_getVertexNumber">getVertexNumber</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.computeBounding">Mesh.computeBounding</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.cube">Mesh.cube</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.cylinder">Mesh.cylinder</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.load">Mesh.load</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.mergeMeshes">Mesh.mergeMeshes</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.plane">Mesh.plane</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.plane2D">Mesh.plane2D</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_Mesh.sphere">Mesh.sphere</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_removeVertexBuffer">removeVertexBuffer</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_setBounding">setBounding</a>

                                
                                
                            </li>
                        
                            <li class="index-item method">
                                <a href="#method_updateBounding">updateBounding</a>

                                
                                
                            </li>
                        
                    </ul>
                </div>
            

            

            

            
        </div>

        
            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

                
                    <div id="method_addBuffers" class="method item">
    <h3 class="name"><code>addBuffers</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>vertexBuffers</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>indexBuffers</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>stream_type</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l136"><code>..&#x2F;src&#x2F;mesh.js:136</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Adds vertex and indices buffers to a mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">vertexBuffers</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>object with all the vertex streams</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">indexBuffers</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>object with all the indices streams</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">stream_type</code>
                        <span class="type">Enum</span>
                    

                    

                    <div class="param-description">
                        <p>default gl.STATIC_DRAW (other: gl.DYNAMIC_DRAW, gl.STREAM_DRAW )</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_addIndexBuffer" class="method item">
    <h3 class="name"><code>addIndexBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>data</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>stream_type</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l285"><code>..&#x2F;src&#x2F;mesh.js:285</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Creates a new empty index buffer and attachs it to this mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">data</code>
                        <span class="type">Typed array</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">stream_type</code>
                        <span class="type">Enum</span>
                    

                    

                    <div class="param-description">
                        <p>gl.STATIC_DRAW, gl.DYNAMIC_DRAW, gl.STREAM_DRAW</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_addVertexBuffer" class="method item">
    <h3 class="name"><code>addVertexBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>attribute</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>spacing</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>buffer_data</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>stream_type</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l216"><code>..&#x2F;src&#x2F;mesh.js:216</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Creates a new empty buffer and attachs it to this mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>&quot;vertices&quot;,&quot;normals&quot;...</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">attribute</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>name of the stream in the shader &quot;a_vertex&quot;,&quot;a_normal&quot;,... [optional, if omitted is used the common_buffers]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">spacing</code>
                        <span class="type">Number</span>
                    

                    

                    <div class="param-description">
                        <p>components per vertex [optioanl, if ommited is used the common_buffers, otherwise 3]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">buffer_data</code>
                        <span class="type">ArrayBufferView</span>
                    

                    

                    <div class="param-description">
                        <p>the data in typed array format [optional, if ommited it created an empty array of getNumVertices() * spacing]</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">stream_type</code>
                        <span class="type">Enum</span>
                    

                    

                    <div class="param-description">
                        <p>[optional, default = gl.STATIC_DRAW (other: gl.DYNAMIC_DRAW, gl.STREAM_DRAW ) ]</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_compile" class="method item">
    <h3 class="name"><code>compile</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>buffer_type</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l319"><code>..&#x2F;src&#x2F;mesh.js:319</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Uploads data inside buffers to VRAM.</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">buffer_type</code>
                        <span class="type">Number</span>
                    

                    

                    <div class="param-description">
                        <p>gl.STATIC_DRAW, gl.DYNAMIC_DRAW, gl.STREAM_DRAW</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_computeNormals" class="method item">
    <h3 class="name"><code>computeNormals</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l460"><code>..&#x2F;src&#x2F;mesh.js:460</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Creates a stream with the normals</p>

    </div>

    

    

    
</div>

                
                    <div id="method_computeTangents" class="method item">
    <h3 class="name"><code>computeTangents</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l531"><code>..&#x2F;src&#x2F;mesh.js:531</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Creates a new stream with the tangents</p>

    </div>

    

    

    
</div>

                
                    <div id="method_computeWireframe" class="method item">
    <h3 class="name"><code>computeWireframe</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l410"><code>..&#x2F;src&#x2F;mesh.js:410</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Creates a new index stream with wireframe</p>

    </div>

    

    

    
</div>

                
                    <div id="method_freeData" class="method item">
    <h3 class="name"><code>freeData</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l679"><code>..&#x2F;src&#x2F;mesh.js:679</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Remove all local memory from the streams (leaving it only in the VRAM) to save RAM</p>

    </div>

    

    

    
</div>

                
                    <div id="method_generateMetadata" class="method item">
    <h3 class="name"><code>generateMetadata</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l338"><code>..&#x2F;src&#x2F;mesh.js:338</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Computes some data about the mesh</p>

    </div>

    

    

    
</div>

                
                    <div id="method_getBuffer" class="method item">
    <h3 class="name"><code>getBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l297"><code>..&#x2F;src&#x2F;mesh.js:297</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a vertex buffer</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>of vertex buffer</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>:
                    
                    <p>the buffer</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_getIndexBuffer" class="method item">
    <h3 class="name"><code>getIndexBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l308"><code>..&#x2F;src&#x2F;mesh.js:308</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a index buffer</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>of index buffer</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>:
                    
                    <p>the buffer</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_getVertexBuffer" class="method item">
    <h3 class="name"><code>getVertexBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l273"><code>..&#x2F;src&#x2F;mesh.js:273</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a vertex buffer</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>of vertex buffer</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Buffer.html" class="crosslink">Buffer</a></span>:
                    
                    <p>the buffer</p>

                
            </div>
        </div>
    

    
</div>

                
                    <div id="method_getVertexNumber" class="method item">
    <h3 class="name"><code>getVertexNumber</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>vertices</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l619"><code>..&#x2F;src&#x2F;mesh.js:619</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Computes bounding information</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">vertices</code>
                        <span class="type">Typed Array</span>
                    

                    

                    <div class="param-description">
                        <p>array containing all the vertices</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.computeBounding" class="method item">
    <h3 class="name"><code>Mesh.computeBounding</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>vertices</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l631"><code>..&#x2F;src&#x2F;mesh.js:631</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Computes bounding information</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">vertices</code>
                        <span class="type">Typed Array</span>
                    

                    

                    <div class="param-description">
                        <p>array containing all the vertices</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.cube" class="method item">
    <h3 class="name"><code>Mesh.cube</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l805"><code>..&#x2F;src&#x2F;mesh.js:805</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a cube mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>valid options: size</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.cylinder" class="method item">
    <h3 class="name"><code>Mesh.cylinder</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l831"><code>..&#x2F;src&#x2F;mesh.js:831</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a cube mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>valid options: radius, height, subdivisions</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.load" class="method item">
    <h3 class="name"><code>Mesh.load</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>buffers</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>output_mesh</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l721"><code>..&#x2F;src&#x2F;mesh.js:721</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Static method for the class Mesh to create a mesh from a list of common streams</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">buffers</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>object will all the buffers</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                         
                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">output_mesh</code>
                        <span class="type"><a href="../classes/Mesh.html" class="crosslink">Mesh</a></span>
                    

                    

                    <div class="param-description">
                        <p>optional mesh to store the mesh, otherwise is created</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.mergeMeshes" class="method item">
    <h3 class="name"><code>Mesh.mergeMeshes</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>meshes</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l957"><code>..&#x2F;src&#x2F;mesh.js:957</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a mesh with all the meshes merged</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">meshes</code>
                        <span class="type">Array</span>
                    

                    

                    <div class="param-description">
                        <p>array containing all the meshes</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.plane" class="method item">
    <h3 class="name"><code>Mesh.plane</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l736"><code>..&#x2F;src&#x2F;mesh.js:736</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a planar mesh (you can choose how many subdivisions)</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>valid options: detail, detailX, detailY, size, width, heigth, xz (horizontal plane)</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_Mesh.plane2D" class="method item">
    <h3 class="name"><code>Mesh.plane2D</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l788"><code>..&#x2F;src&#x2F;mesh.js:788</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a 2D Mesh (be careful, stream is vertices2D )</p>

    </div>

    

    

    
</div>

                
                    <div id="method_Mesh.sphere" class="method item">
    <h3 class="name"><code>Mesh.sphere</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>options</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l893"><code>..&#x2F;src&#x2F;mesh.js:893</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Returns a sphere mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">options</code>
                        <span class="type">Object</span>
                    

                    

                    <div class="param-description">
                        <p>valid options: radius, lat, long</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_removeVertexBuffer" class="method item">
    <h3 class="name"><code>removeVertexBuffer</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>name</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l262"><code>..&#x2F;src&#x2F;mesh.js:262</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Removes a vertex buffer from the mesh</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">name</code>
                        <span class="type">String</span>
                    

                    

                    <div class="param-description">
                        <p>&quot;vertices&quot;,&quot;normals&quot;...</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_setBounding" class="method item">
    <h3 class="name"><code>setBounding</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>center</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code>half_size</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l668"><code>..&#x2F;src&#x2F;mesh.js:668</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>forces a bounding box to be set</p>

    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">center</code>
                        <span class="type">Vec3</span>
                    

                    

                    <div class="param-description">
                        <p>center of the bounding box</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name">half_size</code>
                        <span class="type">Vec3</span>
                    

                    

                    <div class="param-description">
                        <p>vector from the center to positive corner</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    

    
</div>

                
                    <div id="method_updateBounding" class="method item">
    <h3 class="name"><code>updateBounding</code></h3>

    
        <span class="paren">()</span>
    

    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
                Defined in
                
            
        
        
        <a href="../files/.._src_mesh.js.html#l657"><code>..&#x2F;src&#x2F;mesh.js:657</code></a>
        
        </p>


        

        
    </div>

    <div class="description">
        <p>Update bounding information of this mesh</p>

    </div>

    

    

    
</div>

                
            </div>
        

        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
